<?php
$widget_params = isset($widget_params) ? $widget_params : [];
$choice_code_name = \Illuminate\Support\Arr::get($widget_params, 'name', 'store');
$choice_code_key = \Illuminate\Support\Arr::get($widget_params, 'code', 'store');
$choice_noIds = \Illuminate\Support\Arr::get($widget_params, 'noIds', false);
$choice_value = \Illuminate\Support\Arr::get($widget_params, 'value', []);
$_kvs = \App\Facade\Code::get($choice_code_key);
?>
@if(!empty($_kvs))
    @foreach($_kvs as $key=>$value)
        @if($choice_noIds && in_array($key,$choice_noIds))
            @continue
        @endif
        <input type="checkbox"
               name="{{$choice_code_name}}[{{$key}}]"
               class="{{$choice_code_name}}"
               lay-filter="{{$choice_code_name}}"
               value="{{$key}}"
               title="{{$value}}"
               lay-skin="primary"
               @if(in_array($key,$choice_value)) checked @endif/>
    @endforeach
@endif
